import Mock from "mockjs";
// mock的配置
Mock.setup({
  // 随机延时200-300毫秒，模拟网络延时
  timeout: "500-1000",
});
Mock.mock("/web/city", "get", {
  "data|10-20": [
    {
      label: "@city(true)", //城市名随机
      value: "@id", //id随机
    },
  ],
});
Mock.mock("/web/name", "get", {
  "data|10-20": [
    {
      label: "@cname", //城市名随机
      value: "@id", //id随机
    },
  ],
});
let table = [
  { label: "田娜", value: "630000199611107738" },
  { label: "顾娟", value: "710000202104162059" },
  { label: "陆涛", value: "440000197305070012" },
  { label: "韩秀兰", value: "360000197108015612" },
  { label: "段明", value: "150000198902044651" },
  { label: "孟涛", value: "820000198410269467" },
  { label: "余涛", value: "610000199910261707" },
  { label: "邱刚", value: "500000197212263161" },
  { label: "邵霞", value: "460000200109038697" },
  { label: "于军", value: "510000198103022664" },
  { label: "蒋秀兰", value: "220000198608131752" },
  { label: "叶磊", value: "22000019750317214X" },
  { label: "范磊", value: "990000201608018242" },
  { label: "唐芳", value: "810000198211115228" },
  { label: "锺涛", value: "510000197212014749" },
  { label: "蒋刚", value: "460000200802194452" },
  { label: "刘敏", value: "350000200906192659" },
  { label: "文丽", value: "410000198508178778" },
  { label: "杨秀兰", value: "63000020040321776X" },
  { label: "张杰", value: "820000198301133085" },
  { label: "刘芳", value: "61000020230715010X" },
  { label: "孔洋", value: "430000202206288325" },
  { label: "孙军", value: "230000197011032484" },
  { label: "姜杰", value: "63000019880505166X" },
  { label: "罗超", value: "500000197208233955" },
  { label: "孔芳", value: "460000201101133459" },
  { label: "陆勇", value: "130000199212128859" },
  { label: "沈娜", value: "540000202107112012" },
  { label: "郑秀英", value: "350000198205080662" },
  { label: "罗涛", value: "36000019871022397X" },
  { label: "谢勇", value: "410000197601097804" },
  { label: "田娜", value: "630000199611107738" },
  { label: "顾娟", value: "710000202104162059" },
  { label: "陆涛", value: "440000197305070012" },
  { label: "韩秀兰", value: "360000197108015612" },
  { label: "段明", value: "150000198902044651" },
  { label: "孟涛", value: "820000198410269467" },
  { label: "余涛", value: "610000199910261707" },
  { label: "邱刚", value: "500000197212263161" },
  { label: "邵霞", value: "460000200109038697" },
  { label: "于军", value: "510000198103022664" },
  { label: "蒋秀兰", value: "220000198608131752" },
  { label: "叶磊", value: "22000019750317214X" },
  { label: "范磊", value: "990000201608018242" },
  { label: "唐芳", value: "810000198211115228" },
  { label: "锺涛", value: "510000197212014749" },
  { label: "蒋刚", value: "460000200802194452" },
  { label: "刘敏", value: "350000200906192659" },
  { label: "文丽", value: "410000198508178778" },
  { label: "杨秀兰", value: "63000020040321776X" },
  { label: "张杰", value: "820000198301133085" },
  { label: "刘芳", value: "61000020230715010X" },
  { label: "孔洋", value: "430000202206288325" },
  { label: "孙军", value: "230000197011032484" },
  { label: "姜杰", value: "63000019880505166X" },
  { label: "罗超", value: "500000197208233955" },
  { label: "孔芳", value: "460000201101133459" },
  { label: "陆勇", value: "130000199212128859" },
  { label: "沈娜", value: "540000202107112012" },
  { label: "郑秀英", value: "350000198205080662" },
  { label: "罗涛", value: "36000019871022397X" },
  { label: "谢勇", value: "410000197601097804" },
];
// Mock.mock("/web/table", "post", (config) => {
//   console.log(JSON.parse(config.body));
//   return {
//     data: table,
//   };
// });
Mock.mock("/web/table", "post", {
  "data|100-200": [
    {
      label: "@cname", //城市名随机
      value: "@id", //id随机
    },
  ],
});
Mock.mock("/web/tree", "get", {
  "data|10-20": [
    {
      title: "@cname",
      key: "@id",
      "children|10-20": [
        {
          title: "@cname",
          key: "@id",
        },
      ],
    },
  ],
});
